package data;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Group extends Base implements Serializable{
	
	private static final long serialVersionUID = 1L;
	public static final String SeedName="group";
	
	private int id;
	private String name;
	private String summary;
	private String description;
	private Date created_date;
	private int state;
	private int createrId;
	private String createrName;
	private int type;
	
	private static SimpleDateFormat sd=new SimpleDateFormat("yyyy-MM-dd");
	public Date getCreated_date() {
		return created_date;
	}
	public int getCreaterId() {
		return createrId;
	}
	public String getCreaterName() {
		return createrName;
	}
	public String getDescription() {
		return description;
	}
	public int getId() {
		return id;
	}
	public String getName() {
		return name;
	}
	public int getState() {
		return state;
	}
	public String getSummary() {
		return summary;
	}
	public int getType() {
		return type;
	}
	public void setCreated_date(Date created_date) {
		this.created_date = created_date;
	}
	public void setCreaterId(int createrId) {
		this.createrId = createrId;
	}
	public void setCreaterName(String createrName) {
		this.createrName = createrName;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public void setId(int id) {
		this.id = id;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setState(int state) {
		this.state = state;
	}
	public void setSummary(String summary) {
		this.summary = summary;
	}
	public void setType(int type) {
		this.type = type;
	}
	
	public String getDateString(){
		return sd.format(created_date);
	}
	@Override
	public String toString() {
		
		return id+" "+name+" "+getDateString()+" "+createrName;
	}
	

}
